const userRouter = {
  path: '/user',
  component: () => import('@/views/user/index.vue'),
  children: [
    {
      path: 'home',
      component: () => import('@/views/user/home/index.vue'),
      meta: { title: '首页总览', role: ['user'] },
    },
    {
      path: 'books',
      component: () => import('@/views/user/books/index.vue'),
      meta: { title: '图书借阅', role: ['user'] },
    },
    {
      path: 'lectures',
      component: () => import('@/views/user/lectures/index.vue'),
      meta: { title: '讲座报名', role: ['user'] },
    },
    {
      path: 'seats',
      component: () => import('@/views/user/seats/index.vue'),
      meta: { title: '座位预约', role: ['user'] },
    },
    {
      path: 'records',
      component: () => import('@/views/user/records/index.vue'),
      meta: { title: '我的记录', role: ['user'] },
    },
    {
      path: 'profile',
      component: () => import('@/views/user/profile/index.vue'),
      meta: { title: '个人信息', role: ['user'] },
    },
    {
      path: 'library-detail/:id',
      name: 'library-detail-user',
      component: () => import('@/views/user/seats/library-detail.vue'),
      meta: { title: '图书馆详情', role: 'user', hide: true },
    },
  ],
}

export default userRouter
